package com.lin.videospringboot.Utils;

import com.alibaba.fastjson.JSONObject;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

public class ParseJson {

    public static Map<String,Object> parseJson(String s) {
        JSONObject jsonObject = JSONObject.parseObject(s);
        Set<String> jsonSet = jsonObject.keySet();
        Iterator<String> iterator = jsonSet.iterator();

        Map<String,Object> mp = new HashMap<String,Object>();
        while (iterator.hasNext()){
            String key = iterator.next();
            Object value = jsonObject.get(key);
            mp.put(key,value);
        }
        return mp;
    }
}
